﻿@model PagedList.IPagedList<InnoWeb.CEND.UI.MVC.Models.Workshops>

<script src="~/Scripts/Base/jquery-1.9.1.min.js"></script>
<script src="~/Scripts/Base/FancyBox/jquery.mousewheel-3.0.6.pack.js"></script>
<script src="~/Scripts/Base/FancyBox/jquery.fancybox.js"></script>
<script src="~/Scripts/Base/FancyBox/jquery.fancybox-media.js"></script>
<link href="~/Content/Base/FancyBox/jquery.fancybox.css" rel="stylesheet" />

<script type="text/javascript">
    $(document).ready(function () {
        $(".fancybox").fancybox();
        $('.fancybox-media').fancybox({
            openEffect: 'none',
            closeEffect: 'none',
            helpers: {
                media: {}
            }
        });
    });
</script>


<div class="SeminarWorkshop ortala">
    <h1>@ViewBag.ProjectMotto</h1>
    @if (this.Request.Cookies.AllKeys.Contains("_culture"))
    {
        if (this.Request.Cookies["_culture"].Value == "tr-TR")
        {
        <p>@ViewBag.MottoProjectsTR</p>    
        }
        else
        {
        <p>@ViewBag.MottoProjects</p>
        }
    }
    else
    {
        if (UICulture == "tr-TR")
        {
        <p>@ViewBag.MottoProjectsTR</p>    
        }
        else
        {
        <p>@ViewBag.MottoProjects</p>
        }
    }

</div>
<div class="SeminarWorkshopAlan">
    <ul class="ortala">
        @foreach (var item in Model)
        {
            <li>
                @*<a href="@Url.Action("ProjectDetail", "Home", new { projectItemId = item.Id })">*@
                <a class="fancybox fancybox.iframe" href="@Url.Action("ProjectDetail", "Home", new { projectItemId = item.Id })">
                    @*<a class="fancybox" rel="group" href="~/Images/Base/testResim4.png">*@
                    <img src="@Url.Content("~/Content/Images/Thumb/" + item.ImageUrl)" alt="resim" />
                    <div class="Sag">
                        <div class="baslik">
                            @if (this.Request.Cookies.AllKeys.Contains("_culture"))
                            {
                                if (this.Request.Cookies["_culture"].Value == "tr-TR")
                                {
                                <b>@item.NameTR</b>    
                                }
                                else
                                {
                                <b>@item.Name</b>
                                }
                            }
                            else
                            {
                                if (UICulture == "tr-TR")
                                {
                                <b>@item.NameTR</b>    
                                }
                                else
                                {
                                <b>@item.Name</b>
                                }
                            }
                        </div>
                        <div class="icerik">
                            @if (this.Request.Cookies.AllKeys.Contains("_culture"))
                            {
                                if (this.Request.Cookies["_culture"].Value == "tr-TR")
                                {
                                <p>@item.TextTR</p>    
                                }
                                else
                                {
                                <p>@item.Text</p>
                                }
                            }
                            else
                            {
                                if (UICulture == "tr-TR")
                                {
                                <p>@item.TextTR</p>    
                                }
                                else
                                {
                                <p>@item.Text</p>
                                }
                            }
                        </div>
                    </div>
                    @*<div class="ok">
                        <img src="~/Images/Base/arti_pasif.png" alt="ok" class="pasif" />
                        <img src="~/Images/Base/arti_aktif.png" alt="ok" class="aktif" />
                    </div>*@
                </a>
            </li>
        }
    </ul>
    <div class="Sayfalama">
        Sayfa @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber)
        - @Model.PageCount

        @for (int i = 1; i <= Model.PageCount; i++)
        {
            @Html.ActionLink(i.ToString(), "Photos", new { page = i, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter })
            @Html.Raw(" ");
        }

        @if (Model.HasPreviousPage)
        {
            @Html.ActionLink("<<", "Photos", new { page = 1, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter })
            @Html.Raw(" ");
            @Html.ActionLink("< Önceki", "Photos", new { page = Model.PageNumber - 1, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter })
        }
        else
        {
            @:<<
            @Html.Raw(" ");
            @:< Önceki
    }

        @if (Model.HasNextPage)
        {
            @Html.ActionLink("Sonraki >", "Photos", new { page = Model.PageNumber + 1, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter })
            @Html.Raw(" ");
            @Html.ActionLink(">>", "Photos", new { page = Model.PageCount, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter })
        }
        else
        {
            @:Sonraki >
            @Html.Raw(" ")
            @:>>
    }
        @*@for (int i = 1; i <= Model.PageCount; i++)
        {
            @Html.ActionLink(i.ToString(), "Photos", new { page = i, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter })
            @Html.Raw(" ");
        }*@
    </div>
</div>

